package com.anjubao.parking.municipal.parkinglot.feign;

import com.anjubao.parking.municipal.common.dto.ApiResult;
import com.anjubao.parking.municipal.parkinglot.dto.*;
import com.anjubao.parking.municipal.parkinglot.form.VideoPileQueryForm;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author anjubao
 */
public interface ParkingDeviceFeignService {

    /**
     * 根据泊位code获取设备状态
     *
     * @param code
     * @return
     */
    @GetMapping("/feign/parking_lot_device_failure/{code}")
    ApiResult<List<ParkingLotSlotFailureDto>> selectDevices(@PathVariable String code);

    /**
     * 根据车场code获取安装了地磁的泊位id列表
     *
     * @param parkingLotCode
     * @return
     */
    @GetMapping("/feign/parking_lot_device_geomagnetic/{parkingLotCode}")
    ApiResult<List<Long>> selectGeomagnetic(@PathVariable String parkingLotCode);

    /**
     * 根据车场code获取安装了充电桩的泊位id列表
     *
     * @param parkingLotCode
     * @return
     */
    @GetMapping("/feign/parking_lot_device_charging/{parkingLotCode}")
    ApiResult<List<Long>> selectCharging(@PathVariable String parkingLotCode);

    /**
     * 根据车场code获取安装了视频桩的泊位id列表
     *
     * @param parkingLotCode
     * @return
     */
    @GetMapping("/feign/parking_lot_device_video/{parkingLotCode}")
    ApiResult<List<Long>> selectVideo(@PathVariable String parkingLotCode);

    /**
     * 查询视频桩信息接口
     *
     * @param form
     * @return
     */
    @GetMapping("/feign/parking-lots-device-videopiles")
    ApiResult<List<VideoPileDto>> getVideoPile(@RequestBody VideoPileQueryForm form);

    /**
     * 新增log信息接口
     *
     * @param deviceLogDtoList
     * @return
     */
    @PostMapping("/feign/parking-lot-device-log")
    ApiResult saveLog(@RequestBody List<DeviceLogDto> deviceLogDtoList);


    /**
     * 新增图片信息接口
     *
     * @param deviceLogPictureDtoList
     * @return
     */
    @PostMapping("/feign/parking-lot-device-log-picture")
    ApiResult savePicture(@RequestBody List<DeviceLogPictureDto> deviceLogPictureDtoList);
}
